export default axios => {
  return {
    getArticle: getArticle(axios),
    getShare: getShare(axios),
    getContentDetail: getContentDetail(axios),
    getUGCArticle: getUGCArticle(axios),
    getUGCArticleComments: getUGCArticleComments(axios),
    getMensesArticle: getMensesArticle(axios),
    getMensesArticleComments: getMensesArticleComments(axios),
  };
};

const getArticle = axios => id => {
  return axios.get(`/apijson/org_content?cid=${id}`);
};

const getUGCArticle = axios => data => {
  return axios.post(`/apijson/ugc_detail_v2`, data);
};

const getUGCArticleComments = axios => data => {
  return axios.post(`/apijson/ugc_get_comment_list`, data);
};

const getMensesArticle = axios => data => {
  return axios.post(`/apijson/menses`, data);
};

const getMensesArticleComments = axios => data => {
  return axios.get(`/apijson/menses_commentlist`, { params: data });
};

const getShare = axios => id => {
  return axios.get(`/apijson/knowledge_content_v2?cid=${id}`); //知识百科
};

const getContentDetail = axios => id => {
  return axios.get(`/apijson/apphome_content?cid=${id}`); //首页
};


